package com.mashibing.service.impl;

import com.mashibing.internalcommon.dto.ResponseResult;
import com.mashibing.mapper.DriverUserMapper;
import com.mashibing.service.CityDriverUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CityDriverUserServiceImpl implements CityDriverUserService {

    @Autowired
    private DriverUserMapper driverUserMapper;

    @Override
    public ResponseResult<Boolean> isAvailableDriver(String cityCode) {
        Integer count = driverUserMapper.selectDriverUserCount(cityCode);
        if (count > 0) {
            return ResponseResult.success(true);
        }
        return ResponseResult.success(false);
    }
}
